package com.pt.chitra.view.albumView.controller
{
	import com.pt.chitra.view.albumView.model.GalleryProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	public class GetGalleriesImagesCommand extends SimpleCommand
	{
		public function GetGalleriesImagesCommand()
		{
			super();
		}
		
		 override public function execute( note:INotification ) :void    
        {
          if(!facade.hasProxy(GalleryProxy.NAME)){
           	facade.registerProxy(new GalleryProxy());
          }
           galleriesProxy.getGalleryImages(note.getBody()as int);
        }
		
		private function get galleriesProxy():GalleryProxy{
			return facade.retrieveProxy(GalleryProxy.NAME) as GalleryProxy;
		}
		
	}
}